home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Source / Multimedia Source 1996.iso / mmsb15.inf < prev    next >
Text File  |  1996-02-01  |  7KB  |  217 lines

  1. DefineVariables
  2. Number    [ReturnVal2] := 1
  3.   Number    [ReturnVal1]
  4.   Text      [I]  
  5.   Text      [W]  
  6.   Text      [WS]
  7.   TextArray [taBackUpName]
  8.   TextArray [taInUseArray]
  9.   Text      [tInuseLine]  
  10.   Number    [nCounter]    
  11.   Number    [nInUse]      
  12.   Text      [tInUseFileName]
  13.   Text [tNoIconsMessage]
  14.   text [tInstallationComplete]
  15.   Text [tCustomDialogText1] :=
  16.   Text [tFileInUseText5] :=
  17.   Text [tFileInUseText4] :=
  18.   Text [tFileInUseText3] :=
  19.   Text [tFileInUseText2] :=
  20.   Text [tFileInUseText1] :=
  21.   Text [tMenuHelpText1] :=
  22.   Text [tInstallIconsText1] :=
  23.   Text [tInstallIconsText2] :=
  24.   Text [tMenuText3] :=
  25.   Text [tMenuText2] :=
  26.   Text [tMenuText1] :=
  27.   Text [tOK_ButtonText] :=
  28.   Text [tCancel_ButtonText] :=
  29.   Text [tHelp_ButtonText] :=
  30.   Text [tSkipIconInstallText] :=
  31.   Text      [tDisplayString]
  32.   Text      [tDefaultGroupName] := Multimedia Source CD
  33.   TextArray [taProgmanGroupNames]
  34.   Number    [nIconInstall] := 1
  35.   Number    [nIconGroupVal]
  36. Number [TypeSelected] := 1
  37. EndDefineVariables
  38. Procedure SetupDisplay
  39. SetDefaultBitmap Off
  40.   ShowWindow Maximized
  41.   SetBackgroundColor 255 255 255 255 255 128 TopToBottom
  42.   
  43.   
  44.   SetShadowAttrTo BlackOnLightGray
  45.   SetScreenAttrTo BlackOnLightGray
  46.   SetPopupAttrTo  BlackOnLightGray
  47.   SetAttentionAttrTo BlackOnLightGray
  48.   SetTopLineTo Multimedia Source CD Installation
  49.   If FIleExists ShadowDirectory\mmsblog2.bmp
  50.      DeleteFiles from ShadowDirectory Quietly
  51.         mmsblog2.bmp
  52.      EndDeleteFiles 
  53.   EndIf
  54.  
  55.   QueFiles To ShadowDirectory NoInquiry
  56.   mmsblog2.bmp
  57.   EndQueFiles
  58.   GetQuedFiles Quietly
  59.  
  60.   LoadBitmap 1 ShadowDirectory\mmsblog2.bmp
  61. EndProcedure
  62. Procedure Install_Files
  63. QueAllFiles
  64.   DetermineInstallationDrive QueSize RequireFixed
  65.   DetermineInstallationDirectory InstallationDrive:\mmcd
  66.   UnQueFiles
  67.     mmsblog2.bmp
  68.   EndUnQueFiles
  69.   GetQuedFiles 
  70.   Do Install_Icons
  71.   PopUp [tInstallationComplete]
  72. EndProcedure
  73. Procedure Install_Icons
  74.  
  75. ProgramManagerDDE
  76.   CreateGroup([tDefaultGroupName],[WindowsDirectory]\MMSB.GRP)
  77.   AddItem([installationdirectory]\srcebook\mmsb15.exe,MMCD v2.0,[installationdirectory]\srcebook\mmsb2.ico,0)
  78.   AddItem([installationdirectory]\srcebook\survey.wri,Survey,[WindowsDirectory]\write.exe,0)
  79. EndProgramManagerDDE
  80. EndProcedure
  81. Procedure DDENonFatalErrorTrap
  82. ;; Purpose of DDENonFatalErrorTrap:
  83. ;; If a procedure with this name is present in the script and a non-fatal
  84. ;; Program Manager DDE error occurs, then this procedure will be executed.
  85. ;;
  86. ;; Possible Text Error Codes Are:
  87. ;;      ddeExec%s failed      (NOTE:  the 
  88. ;;      ddeInitiate failed
  89. ;;      pmAddItem failed
  90. ;;      pmClose failed
  91. ;;      pmCreateGroup failed
  92. ;;
  93. ;; To trap a DDENonFatalError and respond to it, use the following code
  94. ;; [Number1] := PositionOf "PMAddItem" in DDENonFatalError
  95. ;; If [Number1] > 0
  96. ;;    Dialog
  97. ;;      NonFatal error in AddItem occurred
  98. ;;      Error Text : DDENonFatalError
  99. ;;
  100. ;;    EndDialog
  101. ;; EndIf
  102. EndProcedure
  103. Procedure Modify_Files
  104.  
  105. EndProcedure
  106. Procedure DeleteBitmapFromShadowDir
  107. ;; This procedure deletes the startup bitmap from the
  108. ;; temporary directory where INSTALIT puts its resources.
  109.      DeleteFiles From ShadowDirectory Quietly
  110.        mmsblog2.bmp
  111.      EndDeleteFiles
  112. EndProcedure
  113. Procedure STR_Info
  114. ;; Global Strings for DialogBox
  115. [tOK_ButtonText] := OK
  116. [tCancel_ButtonText] := Cancel
  117. [tHelp_ButtonText] := Help
  118.  
  119. ;; Icon installation messages
  120. [tNoIconsMessage] := No icons will be installed.  Press <OK> to continue.
  121. [tInstallationComplete] := Installation Complete
  122. [tCustomDialogText1] := Select a group to receive Icons
  123. [tInstallIconsText1] := Install icon(s) into Multimedia Source CD
  124. [tInstallIconsText2] := install icon(s) into a different group
  125. [tSkipIconInstallText] := No Icons Will Be Installed.
  126.  
  127. ;; Installation Menu Help
  128. [tMenuHelpText1] := Choose Install MMCD v2.0 to install this product.  Choose Hardware summary to see system settings.  Choose Exit to leave this installation.  Press <OK> to return to main menu.
  129.  
  130. ;; Installation Menu Options
  131. [tMenuText1] := Install MMCD v2.0
  132. [tMenuText2] := Hardware Summary
  133. [tMenuText3] := Exit MMCD Installation
  134.  
  135. ;; Main window top line
  136. SetTopLineTo Multimedia Source CD Installation
  137. EndProcedure
  138. Procedure InstallType
  139. SetBackGroundColor  255 255 255 255 255 128 TopToBottom 
  140. SetDefaultBitMap Off
  141. SetDithering On
  142. ShowWindow Maximize ;;
  143.    DialogBox  @xy(120,120) 225 118 Returns [Number1] BlackOnLightGray UseHeader "MMCD Installation Type" ModalFrame
  144.       Font "MS Sans Serif" 8
  145.       CText @xy(8,7) 206 21 "Welcome to the Multimedia Source CD installation.  Please choose the type of installation your prefer."
  146.       StaticText @xy(12,74) 204 22 "Note: The performance of the Multimedia Source CD is better when you install it to your hard drive."
  147.       PushButton @xy(68,96) 35 15 "OK" 100
  148.       PushButton @xy(112,96) 35 15 "Cancel" 101
  149.       RadioButtonGroup Uses [TypeSelected]
  150.          RadioButton @xy(36,33) 143 10 "Install to hard drive (10mb required)"
  151.          RadioButton @xy(36,52) 129 10 "Install to run from CD-ROM drive"
  152.    EndDialogBox
  153.  
  154. InCase [Number1] Is
  155.     =101:    [TypeSelected] := 1    
  156.          GoTo Start
  157.     =100: 
  158.     =9: SoLong
  159. EndInCase
  160.     
  161. InCase [TypeSelected] Is
  162.     =1: Do Install_Files
  163.         [TypeSelected] := 1    
  164.     =2: Do CDInstall
  165.         [TypeSelected] := 1
  166. EndInCase
  167.  
  168.  
  169. EndProcedure
  170. Procedure CDInstall
  171. ProgramManagerDDE
  172.     CreateGroup("Multimedia Source CD", [WindowsDirectory]\MMCD.GRP)
  173.     AddItem ([InstallFromDrive]:\srcebook\mmsb15.exe, MMCD v2.0, [InstallFromDrive]:\srcebook\mmsb2.ico)
  174.     AddItem ([InstallFromDrive]:\srcebook\survey.wri, Survey, [WindowsDirectory]\write.exe)
  175. EndProgramManagerDDE
  176.  
  177. PopUp [tInstallationComplete]
  178. EndProcedure
  179.  
  180. Do SetupDisplay
  181. Do STR_Info
  182. ShowBitMap 1 @xy(1,1)
  183.  
  184. :Start
  185. DialogBox 200 100 UseHeader "MMCD Installation Menu" Returns [ReturnVal1] BlackOnLightGray ModalFrame
  186.  GroupBox @xy(10,4) 180 70 ""
  187.  RadioButtonGroup Uses [ReturnVal2]
  188.     RadioButton @xy(15,17) 120 12 [tMenuText1]
  189.     RadioButton @xy(15,30) 120 12 [tMenuText3]
  190.  PushButton @xy(30,80) 40 14 "[tOK_ButtonText]" 1
  191.  PushButton @xy(130,80) 40 14 "[tHelp_ButtonText]" 8
  192. EndDialogBox
  193.  
  194. Incase [ReturnVal1] Is
  195.    =8: Dialog BlackOnLightGray UseHeader "MMCD Install Help"
  196.            .l Choose Install MMCD v2.0 to install this product.
  197.            .l Choose Exit to leave this installation.
  198.             .c Press <OK> to return to main menu.
  199.           EndDialog
  200.           GoTo Start
  201.  
  202.   =9: SoLong
  203. EndInCase
  204.  
  205. InCase [ReturnVal2] Is
  206. =1: Do InstallType
  207.     [ReturnVal2] := 2
  208.     GoTo Start
  209.  
  210. =2:
  211.  
  212.  
  213.  
  214.   Do DeleteBitmapFromShadowDir
  215.     SoLong
  216. EndInCase
  217.